package com.epam.giorgadze.task1.factory;

import com.epam.giorgadze.task1.countries.Country;
import com.epam.giorgadze.task1.entity.Manufacturer;

import java.util.Random;

/**
 * User: Luka
 * Date: 11.02.14
 * Time: 22:09
 */
public class ManufacturerFactory {
    public static Manufacturer createManufacturer(String name, String email, String address) {
        Random rand = new Random();
        Manufacturer manufacturer = new Manufacturer(name, email, Country.values()[(new Random().nextInt(Country.values().length))],
                rand.nextInt() * 50 + 1, address);
        return manufacturer;
    }
}
